<!DOCTYPE html 
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head>
  <title>Pixelpost | GettingStarted / AlternativeLanguage</title>
  <link rel='stylesheet' href='http://www.pixelpost.org/docs/pub/skins/print/print.css' type='text/css' />
  <!--HTMLHeader--><style type='text/css'><!--
  ul, ol, pre, dl, p { margin-top:0px; margin-bottom:0px; }
  code.escaped { white-space: nowrap; }
  .vspace { margin-top:1.33em; }
  .indent { margin-left:40px; }
  .outdent { margin-left:40px; text-indent:-40px; }
  a.createlinktext { text-decoration:none; border-bottom:1px dotted gray; }
  a.createlink { text-decoration:none; position:relative; top:-0.5em;
    font-weight:bold; font-size:smaller; border-bottom:none; }
  img { border:0px; }
  .editconflict { color:green; 
  font-style:italic; margin-top:1.33em; margin-bottom:1.33em; }

  table.markup { border:2px dotted #ccf; width:90%; }
  td.markup1, td.markup2 { padding-left:10px; padding-right:10px; }
  table.vert td.markup1 { border-bottom:1px solid #ccf; }
  table.horiz td.markup1 { width:23em; border-right:1px solid #ccf; }
  table.markup caption { text-align:left; }
  div.faq p, div.faq pre { margin-left:2em; }
  div.faq p.question { margin:1em 0 0.75em 0; font-weight:bold; }
   
    .frame 
      { border:1px solid #cccccc; padding:4px; background-color:#f9f9f9; }
    .lfloat { float:left; margin-right:0.5em; }
    .rfloat { float:right; margin-left:0.5em; }
a.varlink { text-decoration:none; }

--></style><link rel='alternate' title='Pixelpost RSS Feed'
      href='http://www.pixelpost.org/docs/Main/AllRecentChanges?action=rss'
      type='application/rss+xml' />
    <meta name='robots' content='noindex,nofollow' />

</head>
<body>
  <div id='printhead'>
    <h3>From Pixelpost</h3>
    <h1 class='pagename'>GettingStarted: AlternativeLanguage</h1>
  </div>
<!--PageText-->
<div id='wikitext'>
<p  style='text-align: right;'> <strong>Language: <a class='wikilink' href='http://www.pixelpost.org/docs/GettingStarted/AlternativeLanguage?action=print'>en</a> <a class='wikilink' href='http://www.pixelpost.org/docs/GettingStarted/AlternativeLanguage?action=print'>de</a> </strong>
</p><h2><a name='AlternativeLanguage' id='AlternativeLanguage'></a> Alternative Language</h2>
<p>You can set a default language and an alternative language in the admin panel. The default language is the behavior of the old version (1.5 and earlier) of Pixelpost. It uses the default templates (e.g. image_template.html). If you select an alternative language and you want to switch back and forth you need a set of new template files for this language. So the best thing to do is make a copy of the old template (for example the about_template.html), translate everything you want to the alternative language in that template and rename the template as follows:
</p>
<p class='vspace'>Each language in Pixelpost has is own abbreviation as shown below:
</p>
<div class='vspace'></div>
<table class='langTable' ><tr ><th class=col1>Abbreviation:</th><th class=col2 align='left'>Language:</th></tr>
<tr ><td class=col1 align='left'>NL</td><td class=col2 align='left'>Dutch</td></tr>
<tr ><td class=col1 align='left'>EN</td><td class=col2 align='left'>English</td></tr>
<tr ><td class=col1 align='left'>FR</td><td class=col2 align='left'>French</td></tr>
<tr ><td class=col1 align='left'>DE</td><td class=col2 align='left'>German</td></tr>
<tr ><td class=col1 align='left'>IT</td><td class=col2 align='left'>Italian</td></tr>
<tr ><td class=col1 align='left'>NO</td><td class=col2 align='left'>Norwegian</td></tr>
<tr ><td class=col1 align='left'>FA</td><td class=col2 align='left'>Persian</td></tr>
<tr ><td class=col1 align='left'>PL</td><td class=col2 align='left'>Polish</td></tr>
<tr ><td class=col1 align='left'>PT</td><td class=col2 align='left'>Portuguese</td></tr>
<tr ><td class=col1 align='left'>CN</td><td class=col2>Simplified Chinese</td></tr>
<tr ><td class=col1 align='left'>ES</td><td class=col2 align='left'>Spanish</td></tr>
<tr ><td class=col1 align='left'>SE</td><td class=col2 align='left'>Swedish</td></tr>
<tr ><td class=col1 align='left'>JP</td><td class=col2 align='left'>Japanese</td></tr>
</table>
<p class='vspace'>So let's say, for the sake of argument, I have my alternative language set to Dutch and the default to English. I have a default template with all items in English and it uses the English language file. Now I want to switch between English and Dutch. So I copy the default template files, translate everything the users see from English in Dutch (like the about page) and rename the template following the scheme below:
</p>
<p class='vspace'>image_template.html =&gt; image_nl_template.html
</p>
<p class='vspace'>So right before "_template.html" I add a "_xx" where xx is the abbreviation of the alternative language. Do this for all template files.
</p>
<p class='vspace'>I've included some tags to make switching easier:
</p>
<p class='vspace'><a class='wikilink' href='http://www.pixelpost.org/docs/TemplateTags/ALTERNATIVE_LANGUAGE?action=print'>&lt;ALTERNATIVE_LANGUAGE&gt;</a>
Gives a full URL to switch to the alternative language set from the adminpanel (warning: requires alternative language templates). Best part of this is when you switch to the alternative language a link will be displayed for the default language and vice versa.
</p>
<p class='vspace'><a class='wikilink' href='http://www.pixelpost.org/docs/TemplateTags/LANGUAGExx?action=print'>&lt;LANGUAGE=xx&gt;</a>
Gives a full URL to switch to any language (provided there are templates) The xx part is the language abbreviation mentioned earlier. (This is a fixed link. If you switch to this language this link will not change)
</p>
<p class='vspace'>So switching to another language will use new templates but will also include the correct language file and for the alternative language the alternative tags, categories, titles, image description will be used.
</p>
</div>

  <div id='printfoot'>
    <div class='from'>Retrieved from http://www.pixelpost.org/docs/GettingStarted/AlternativeLanguage</div>
    <div class='lastmod'>Page last modified on October 24, 2007, at 02:29 PM</div></div>
<!--HTMLFooter-->
</body>
</html>
